package cn.boy.gui.adminstrator;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import cn.boy.home.R;

public class AdminMarkActivity extends Activity implements OnClickListener{
	
	Button no_1_button;
	Button no_2_button;
	Button no_3_button;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.admin_mark);
		
		findViews();
	}

	private void findViews() {

		no_1_button = (Button)findViewById(R.id.btn_no_1);
		no_1_button.setOnClickListener(this);
		no_2_button = (Button)findViewById(R.id.btn_no_2);
		no_2_button.setOnClickListener(this);
		no_3_button = (Button)findViewById(R.id.btn_no_3);
		no_3_button.setOnClickListener(this);
	}

	public void onClick(View v) {
		
		Intent intent = new Intent(AdminMarkActivity.this,DormitoryListActivity.class);

		switch(v.getId()){
			case R.id.btn_no_1:
				intent.putExtra("no_prex", "01");
				break;
			case R.id.btn_no_2:
				intent.putExtra("no_prex", "02");
				break;
			case R.id.btn_no_3:
				intent.putExtra("no_prex", "03");
				break;
		}
		startActivity(intent);
	}
}
